﻿<Page
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:MyProject.Views.Auth"
      x:Class="MyProject.Views.Auth.AuthPage"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="AuthPage">
    <Grid HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Label 
            FontSize="25"
            Grid.ColumnSpan="2" 
            Grid.Column="2" 
            Margin="-80,40,0,0"
            Grid.Row="0" >
            Авторизация
        </Label>
        <Label 
            FontSize="14"
            Grid.ColumnSpan="2" 
            Grid.Column="1" 
            Margin="0,0,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Bottom"
            Grid.Row="0" >
            Логин
        </Label>
        <TextBox
            x:Name="Auth_Login"
            Text="{Binding LoginForm.Login, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            HorizontalAlignment="Stretch"
            Grid.ColumnSpan="2" 
            Grid.Column="1" 
            Grid.Row="1" 
            TextWrapping="Wrap"
            VerticalAlignment="Top">
            <TextBox.Resources>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="CornerRadius" Value="4"/>
                </Style>
            </TextBox.Resources>
        </TextBox>
        <Label
            Visibility="Collapsed"
            x:Name="Auth_Login_Error"
            Grid.ColumnSpan="2"
            Grid.Column="1"
            Grid.Row="1"
            Margin="0,15,0,0"
            FontSize="12" 
            Foreground="#FFF50000"></Label>
        <Label 
            FontSize="14"
            Grid.ColumnSpan="2" 
            Grid.Column="1" 
            Margin="0,35,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            Grid.Row="1" >
            Пароль
        </Label>
        <TextBox
            x:Name="Auth_Password"
            Text="{Binding LoginForm.Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            HorizontalAlignment="Stretch"
            Grid.ColumnSpan="2"
            Grid.Column="1"
            Grid.Row="1"
            Margin="0,60,0,0"
            VerticalAlignment="Top">
            <TextBox.Resources>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="CornerRadius" Value="4"/>
                </Style>
            </TextBox.Resources>
        </TextBox>

        <Label
            x:Name="Auth_Password_Error"
            Visibility="Collapsed"
            Grid.ColumnSpan="2"
            Grid.Column="1"
            Grid.Row="1"
            Margin="0,75,0,0"
            FontSize="12"
            Foreground="#FFF50000"></Label>
        <Button
            Command="{Binding LogInCommand}"
            Grid.Column="2" 
            Content="Войти"
            Width="120"
            Height="35" 
            HorizontalAlignment="Center" 
            Margin="-230,0,0,0" 
            Grid.Row="2" 
            VerticalAlignment="Top">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="4"/>
                </Style>
            </Button.Resources>
        </Button>
    </Grid>
</Page>
